#include "cnsComObjDefinition.h"
#include <QDebug>
#include "cnsDefaultComFactory.h"
#include "cnsDefinitionReader.h"

CNS_INIT(CnsComObjDefinition)
CNS_REGISTER_COM_FACTORY(CnsComObjDefinition)
CNS_INIT_END

const QString *CnsRootComDefinition::getInheritFullPath(CnsDefaultComFactory *registry) noexcept
{
    if(_inheritFullPath)
    {
        return _inheritFullPath;
    } else{
        _inheritFullPath = registry->getFullPathFromPathAbbr(*_dirFullPath, _inheritPath, true);
        return _inheritFullPath;
    }
}
const QString *CnsComObjDefinition::getDefFullPath(CnsDefaultComFactory *registry) noexcept
{
    if(_defFullPath)
    {
        return _defFullPath;
    } else{
        _defFullPath = registry->getFullPathFromPathAbbr(*_dirFullPath, "//"+_nameSpace+'/'+_name, false);
        return _defFullPath;
    }
}
